<template>
  <div>
    <input type="text" placeholder="请输入需要查询的用户id" v-model.number="id">
    <router-link :to="`/user/${id}`" class="btn">click</router-link>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "user",
  data(){
    return {
      id:""
    }
  }
}
</script>

<style scoped>
  .btn{
    width: 60px;
    height: 25px;
    text-align: center;
    line-height: 12px;
    background: pink;
    border-radius: 50%;
    margin-left: 5px;
  }
</style>